package com.morgan.storageperlib.entity

import android.content.Intent
import androidx.activity.result.ActivityResult
import androidx.activity.result.ActivityResultCallback
import androidx.activity.result.contract.ActivityResultContract
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity

/**
 *description：ActivityResult处理
 *<br>author：caowugao
 *<br>time：2021/3/5 0005 18:07
 */
open class BaseActivityResultHandler (act : AppCompatActivity, contract : ActivityResultContract<Intent, ActivityResult> = ActivityResultContracts.StartActivityForResult(), callback : ActivityResultCallback<ActivityResult>) {
    protected val launcher = act.registerForActivityResult(contract, callback)
}